<!-- <div class="row">
  <h1 translate lib="web">deleted entities</h1>
  <p class="col-md-5 lead"></p>
</div> -->

<div class="row">
  <div class="col-sm">
    <div className="btn-group-justified">
      <div class="btn-group" role="group">
        <select ng-model="ctrl.collection" ng-options="item.name as item.name for item in ctrl.collections"
          ng-change="ctrl.SelectCollection()">
        </select>
      </div>
    </div>
  </div>
  <div class="col-sm">
  </div>
  <div class="col-sm text-right">
    <em class="fas fa-cog fa-spin" ng-show="ctrl.loading==true"></em>
  </div>
</div>

<div ng-show="ctrl.errormessage != ''"" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>

<table id=" table1" class="table table-striped table-hover table-sm" when-scrolled="ctrl.more()" style="width: 100%;" aria-label="List of deleted items">
  <thead class="thead-dark">
    <tr>
      <th scope="col" ng-click="ctrl.ToggleOrder('name')"><strong translate lib="web">name</strong></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('_type')"><strong translate lib="web">type</strong></th>
      <!-- <th scope="col" ng-click="ctrl.ToggleOrder('_createdby')"><strong translate lib="web">createdby</strong></th> -->
      <th scope="col" ng-click="ctrl.ToggleOrder('_deleted')"><strong translate lib="web">deleted</strong></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('_deletedby')"><strong translate lib="web">by</strong></th>
      <!-- <th scope="col" ng-click="ctrl.ToggleOrder('_created')"><strong translate lib="web">created</strong></th> -->
      <th scope="col" ng-click="ctrl.ToggleOrder('_modified')"><strong translate lib="web">updated</strong></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="model in ctrl.models">
      <td><a style="color: inherit; text-decoration: inherit;" ng-href="#/History/{{ctrl.collection}}/{{model.id}}">{{model.name}}</a></td>
      <td><span translate lib="web">{{model.type || model._type}}</span></td>
      <!-- <td>{{model._createdby}}</td> -->
      <td>
        <timesince ng-model="model._deleted" />
      </td>
      <td>
        {{ model._deletedby }}
      </td>
      <!-- <td>
        <timesince ng-model="model._created" />
      </td> -->
      <td>
        <timesince ng-model="model._modified" />
      </td>
      <td>
        <a ng-href="#/History/{{ctrl.collection}}/{{model.id}}" class="btn"><em class="fas fa-search"></em></a>
      </td>
    </tr>
  </tbody>
</table>